#include "d_Math.h"

using namespace d_Math;

d_Vec2f::d_Vec2f()
{
	p[0] = p[1] = 0;
}

d_Vec2f::d_Vec2f(float x, float y)
{
	p[0] = x;
	p[1] = y;
}

d_Vec2f d_Math::norm(d_Vec2f a)
{
	return d_Vec2f(a[0]/a.length(), a[1]/a.length());
}

float d_Math::dot(d_Vec2f a, d_Vec2f b)
{
	return a[0]*b[0]+a[1]*b[1];
}

